// components/State/State.js
Component({
  /**
   * 组件的属性列表
   */
  properties: {

  },

  /**
   * 组件的初始数据
   */
  data: {
    stateList: [
      {
        'name': '备孕中',
        'id': '1',
        'icon': '../../assets/images/ready.png',
        'act-icon': '../../assets/images/ready-act.png',
        'status': 'ready'
      },
      {
        'name': '怀孕中',
        'id': '2',
        'icon': '../../assets/images/proceed.png',
        'act-icon': '../../assets/images/proceed-act.png',
        'status': 'proceed'
      },
      {
        'name': '宝宝已出生',
        'id': '3',
        'icon': '../../assets/images/finish.png',
        'act-icon': '../../assets/images/finish-act.png',
        'status': 'finish'
      }
    ],
    inoculationStatus: ''
  },

  /**
   * 组件的方法列表
   */
  methods: {
    selectState (e) {
      this.setData({ inoculationStatus: e.currentTarget.id })
      this.triggerEvent('changeState', e.currentTarget.id)
    }
  }
})
